<?php


namespace app\validate;


use think\Validate;

class PostsValidate extends Validate
{
    protected  $rule =[

        'id|ID'       =>  'require',
        'title|标题'       =>  'require|max:49|min:1',
        'content|内容' => 'require|max:10086',
        'info|内容' => 'require|max:233',
    ];

    protected $scene =[
        'insertposts' => ['title', 'content'],
        'commitPost' => ['id','content'],
        'commitInfo' => [ 'id','info'],
    ];
}